package com.itheima.mp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.mp.domain.dto.PageDTO;
import com.itheima.mp.domain.po.User;
import com.itheima.mp.domain.query.PageQuery;
import com.itheima.mp.domain.query.UserQuery;
import com.itheima.mp.domain.vo.UserVO;

import java.util.List;

public interface UserService extends IService<User> {
        /**
         * 根据id扣减余额
         * @param id
         * @param money
         */
    void deductBalance(Long id, Integer money);

    /**
     * 条件查询
     * @param name
     * @param status
     * @param minBalance
     * @param maxBalance
     * @return
     */
    List<User> qurtyUsers(String name, Integer status, Integer minBalance, Integer maxBalance);

    UserVO queryUserAndAddressById(Long userId);

    /**
     * 分页查询
     * @param query
     * @return
     */

    PageDTO<UserVO> queryUserpage(PageQuery query);
}

